package com.ndp.fb.walle.business.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.ndp.fb.rdb.api.BusinessManagerRdbService;
import com.ndp.fb.rdb.model.BusinessManager;
import com.ndp.fb.walle.business.BusinessManagerService;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by infi on 2015/1/29.
 */
@Component
public class BusinessManagerServiceImpl implements BusinessManagerService {

    @Reference
    private BusinessManagerRdbService businessManagerRdbServices;

    private final org.slf4j.Logger logger = LoggerFactory.getLogger(getClass());

    @Override
    public BusinessManager findByFbBusinessId(Long fbBusinessesId) {
        return businessManagerRdbServices.findByFbBusinessesId(fbBusinessesId);
    }

    @Override
    public Long saveBusinessManager(BusinessManager businessManager) {
        return businessManagerRdbServices.saveBusinessManager(businessManager);
    }

    @Override
    public List<BusinessManager> findByUserId(String userId) {
        return businessManagerRdbServices.findByUserId(userId);
    }

	@Override
	public List<BusinessManager> findByUserId(String userId, String role) {
		return businessManagerRdbServices.findByUserId(userId,role);
	}

}
